<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="common :: common_header(~{::title},~{})">
<meta charset="UTF-8">
	<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" th:href="@{/webjars/bootstrap/dist/css/bootstrap.min.css}">
	<script type="text/javascript" src=""></script>
<title>实名认证</title>
</head>
<body>
	<style type="text/css">
		.bg-success {
			padding: 15px;
		}
	</style>
	<div th:replace="~{index :: top}">
	<div class="navbar-fixed-top">
		<div class="navbar navbar-inverse" style="border-width:0 0 1px;border-radius: 0px;margin-bottom: 0px;">
			<div class="container">
				<div class="contactus">
					<div class="navbar-text">
						<span>欢迎致电：<strong th:text="${#servletContext.getAttribute('configurationParameter').servicePhone}">400-1212-1212</strong></span>
						<span>服务时间<span th:text="${#servletContext.getAttribute('configurationParameter').serviceTime}">9:00-21:00</span></span>
					</div>
					
					<div class="navbar-right">
						<ul class="nav navbar-nav">
							<li><a href="#" th:href="@{/info/index}">运营数据</a></li>
							<li><a href="#">最新活动</a></li>
							<li><a href="#">积木坛子</a></li>
							<li><a href="#">下载客户端</a></li>
							<li sec:authorize="hasRole('ROLE_ADMIN')"><a href="" target="_blank" th:href="@{/manager/index}">访问后台管理系统</a></li>
							<li sec:authorize="isAuthenticated()"><a href="#" th:text="${#authentication.name}">用户名</a></li>
							<li sec:authorize="isAuthenticated()"><a href="#" th:href="@{/user/signOut}">退出</a></li>
							<li sec:authorize="!isAuthenticated()"><a href="" th:href="@{/user/index}">登录</a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<nav class="navbar navbar-default">
			<div class="container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed">
						<span class="sr-only">Toggle navigation</span> <span
							class="icon-bar"></span> <span class="icon-bar"></span> <span
							class="icon-bar"></span>
					</button>
					<a class="navbar-brand" href="" th:href="@{/index}">Brand</a>
				</div>

				<div class="collapse navbar-collapse">
					<ul class="nav navbar-nav">
						<li class="active"><a href="" th:href="@{/index}">首页</a></li>
						<li><a href="#" th:href="@{/borrow/index}">我要投标</a></li>
						<li><a href="" th:href="@{/user/index}">我的账户</a></li>
						<li><a href="#" th:href="@{/home/about}">信息披露</a></li>
					</ul>
				</div>
			</div>
		</nav>
	</div>
			<div style="margin-top: 120px;"></div>
	</div>
	<div class="container">
		<div th:replace="~{common :: common_left}">
			<div class="col-md-2">
				<div class="panel panel-default">
					<div class="list-group">
						<a href="#" class="list-group-item">资产总额</a>
					</div>
				</div>

				<div class="panel panel-default">
					<div class="panel-heading">账户管理</div>
					<div class="list-group">
						<a href="#" th:href="@{/user/securityCenter}" class="list-group-item">账户设置</a>
					</div>
				</div>
			</div>
		</div>
		<div class="col-md-10">
			<div class="panel panel-default">
				<div class="panel-body">
					<div th:if="${memberStatus.realName == 0}">
						<form action="" th:action="@{/user/realName}" method="post" class="doAjaxDialog">
							<div class="form-group">
								<label>姓名：</label>
								<div>
									<input type="text" class="form-control">
								</div>
							</div>
							<div class="form-group">
								<label>身份证号码</label>
								<div>
									<input type="text" class="form-control">
								</div>
							</div>
							<div class="form-group">
								<input type="submit" value="确认" class="btn btn-primary">
							</div>
						</form>
					</div>
					<div th:if="${memberStatus.realName == 2}">
						<p class="bg-success">您的身份证号码正在审核中，请稍后。</p>
					</div>
					<div th:if="${memberStatus.realName == 1}">
						<p th:if="${memberStatus.openAccount == false}" class="bg-success">审核已经通过，<a href="">请开通托管账户</a></p>
						<p th:if="${memberStatus.openAccount == true}" class="bg-success">审核已经通过。</p>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		$(document).ready(function(){
			$(".doAjaxDialog").submit(function(){
				$.ajax({
					url:$(this).attr('action'),
					type:'POST',
					data:$(this).serialize(),
					success:function(result){
						if(result.status == 200){
							alert.show("任务提交成功");
							window.location.reload();
						}else{
							alert.show("任务提交失败");
						}
					}
				});
				return false;
			});
		});
	</script>
</body>
</html>